<layout name='Layout/layout_page' />
	<ol class="breadcrumb">
		<li><a href="<{:U('Weixin/index')}>">微信设置</a></li>
      	<li class="active">自定义菜单</li>
    </ol>
	
    <form id="ajaxForm" action="<{:U('Weixin/make')}>" method="post" class="form-horizontal form-validata">
	<div class="panel panel-default">
		<div class="panel-heading">
    		<h3 class="panel-title">编辑完菜单后必须重新生成才能生效，生效时间2个小时左右</h3>
  		</div>
  		<div class="panel-body">
  			<div class="level level1 title">菜单名称
    			<div class="actionBox">
    				<p class="c1">操作</p>   
    				<p class="c2">类型数值</p>
    				<p class="c3">排序</p>
    				<p class="c4">类型</p>    				 				
    			</div>
    		</div>
    		<volist name="list" id="vo">
    		<div class="level level1"><{$vo.name}>
    			<div class="actionBox">
    				<p class="c1"><a href="javascript:void(0)" onclick="openWindow('编辑菜单' , '<{:U('Weixin/editmenu',array('id'=>$vo['id']))}>')">编辑</a> <a href="<{:U('Weixin/delmenu',array('id'=>$vo['id']))}>" onClick="if(!confirm('删除后不可恢复！确定吗？'))return false;">删除</a></p>   
    				<p class="c2"><eq name="vo.type" value="click"><{$vo.keyword}><else/><{$vo.url}></eq></p>
    				<p class="c3"><{$vo.sort}></p>
    				<p class="c4"><eq name="vo.type" value="click">click事件<else/>跳转URL</eq></p>    				 				
    			</div>
    		</div>
    		<volist name="vo.child" id="r">
			<div class="level level2"><i></i><span><{$r.name}></span>
    			<div class="actionBox">
    				<p class="c1"><a href="javascript:void(0)" onclick="openWindow('编辑菜单' , '<{:U('Weixin/editmenu',array('id'=>$r['id']))}>')">编辑</a> <a href="<{:U('Weixin/delmenu',array('id'=>$r['id']))}>" onClick="if(!confirm('删除后不可恢复！确定吗？'))return false;">删除</a></p>   
    				<p class="c2"><eq name="r.type" value="click"><{$r.keyword}><else/><{$r.url}></eq></p>
    				<p class="c3"><{$r.sort}></p>
    				<p class="c4"><eq name="r.type" value="click">click事件<else/>跳转URL</eq></p>    				 				
    			</div>
    		</div>
    		</volist>
    		</volist>
  		</div>

  		<div class="panel-footer">
    	<button type="submit" class="btn btn-info">生成菜单</button>    
    	<button type="button" onclick="openWindow('添加菜单' , '<{:U('Weixin/addmenu')}>')" class="btn btn-success">添加</a>	
  		</div>
	</div>
	</form>

	
</div>

<input type="hidden" id="menu_action" value="weixin" />